"""more natures added

Revision ID: 4dfb3f850dbc
Revises: 03af83010db0
Create Date: 2025-10-28 22:18:36.508437

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '4dfb3f850dbc'
down_revision: Union[str, Sequence[str], None] = '03af83010db0'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('tb_departments', sa.Column('pid', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'tb_departments', 'tb_departments', ['pid'], ['id'])
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'tb_departments', type_='foreignkey')
    op.drop_column('tb_departments', 'pid')
    # ### end Alembic commands ###
